package main

import (
	"net"
	"fmt"
)

func main()  {
	tcpaddr,_:=net.ResolveTCPAddr("tcp4","10.0.154.198:9527")
	tcpconn,_:=net.DialTCP("tcp4",nil,tcpaddr)
	defer tcpconn.Close()
	for{
		line:=""
		fmt.Scanln(&line)
		tcpconn.Write([]byte(line))
		if line=="over"{
			break
		}
		bs:=make([]byte,512)
		n,_:=tcpconn.Read(bs)
		fmt.Println("服务端",tcpconn.RemoteAddr(),"ECHO说：",string(bs[:n]))
	}
}
